class AssertUtil:

    def assert_util(self, res, exp1, exp2, exp3):
        assert res.status_code == 200
        assert res.json().get("success") == exp1
        assert res.json()["code"] == exp2
        assert exp3 in res.json()["message"]

    def assert_add_util(self, res, exp1, exp2, exp3):
        assert res.status_code == 200
        assert res.json().get("success") == exp1
        assert res.json()["code"] == exp2
        assert exp3 in res.json()["message"]

    def assert_modify_util(self, res, exp1, exp2, exp3):
        assert res.status_code == 200
        assert res.json().get("success") == exp1
        assert res.json()["code"] == exp2
        assert exp3 in res.json()["message"]


    def assert_query_util(self, res, exp1, exp2, exp3):
        assert res.status_code == 200
        assert res.json().get("success") == exp1
        assert res.json()["code"] == exp2
        assert exp3 in res.json()["message"]

    def assert_delete_util(self, res, exp1, exp2, exp3):
        assert res.status_code == 200
        assert res.json().get("success") == exp1
        assert res.json()["code"] == exp2
        assert exp3 in res.json()["message"]

    def assert_business_util(self, res, res1, res2, res3, res4, exp1, exp2, exp3):
        self.assert_util(res, exp1, exp2, exp3)
        self.assert_add_util(res1, exp1, exp2, exp3)
        self.assert_query_util(res2, exp1, exp2, exp3)
        self.assert_modify_util(res3, exp1, exp2, exp3)
        self.assert_delete_util(res4, exp1, exp2, exp3)
